package com.example.medicine.Mapper;

import com.example.medicine.Bean.SystemRoleFunction;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

@Mapper
public interface SystemRoleFunctionMapper {
    @Select("select FunctionID from [SystemRoleFunction] where RoleID=#{RoleID}")
    Set<String> getFunIdByRoleId(String RoleID);

    @Insert("insert into [SystemRoleFunction]( ID , RoleID , FunctionID ) values( NEWID() , #{RoleID} , #{FunctionID} )")
    void insert(SystemRoleFunction systemRoleFunction);

    @Delete("delete from [SystemRoleFunction] where RoleID=#{RoleID}")
    void deleteByRoleID(String RoleID);
}
